﻿@namespace MudBlazor
@inherits MudComponentBase

<div @attributes="UserAttributes" class="@ContainerClass" style="@RootStyle" @onpointerenter="@HandlePointerEnterAsync" @onpointerleave="@HandlePointerLeaveAsync" @onpointerup="@HandlePointerUpAsync" @onfocusin="@HandleFocusInAsync" @onfocusout="@HandleFocusOutAsync">
    @ChildContent
    @if (ShowToolTip())
    {
        <MudPopover Open="@_visibleState.Value" Duration="@Duration" Delay="@Delay" AnchorOrigin="@_anchorOrigin" TransformOrigin="@_transformOrigin" Class="@Classname" Style="@Style" Paper="false">
            @if (TooltipContent is not null)
            {
                <div class="d-block">
                    @TooltipContent
                </div>
            }
            else if (!string.IsNullOrEmpty(Text))
            {
                @Text
            }
        </MudPopover>
    }
</div>
